package net.mlike.openssp.server.security.shiro.token;

import org.apache.shiro.authc.AuthenticationToken;

/**
 * Created by wallellen@hotmail.com on 5/31/18.
 */
public class UserPasswordToken implements AuthenticationToken {
    private String username;
    private String password;
    private long time;
    private String host;
    private String token;

    public UserPasswordToken() {
    }

    public UserPasswordToken(String username, String password, long time, String host, String token) {
        this.username = username;
        this.password = password;
        this.time = time;
        this.host = host;
        this.token = token;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public long getTime() {
        return time;
    }

    public void setTime(long time) {
        this.time = time;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    @Override
    public Object getPrincipal() {
        return username;
    }

    @Override
    public Object getCredentials() {
        return null;
    }
}
